package com.hzw.saas.api.product.dto;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzw.saas.common.util.constants.PatternConsts;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 02/21/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("用户产品信息概要")
public class UserProductInfoDto extends ProductDto {

    private static final long serialVersionUID = -8673791573655376689L;

    @ApiModelProperty(value = "产品LicenseId")
    private String licenseId;

    @ApiModelProperty(value = "允许使用的最大CPU核数", hidden = true)
    private Integer maxCpuCore;

    @ApiModelProperty(value = "允许使用的最大内存单位G", hidden = true)
    private Integer maxMemory;

    @ApiModelProperty(value = "授权控制", notes = "1-GUI界面，2-本地计算，4-远程计算; 数字可以组合")
    private Integer parallelModel;

    @ApiModelProperty(value = "授权控制描述")
    private String parallelModelText;

    @ApiModelProperty(value = "产品类型", notes = "0-单机, 1-一体机, 2-局域网hpc, 3-超算中心", hidden = true)
    private Integer productType;

    @ApiModelProperty(value = "产品类型描述", hidden = true)
    private String productTypeText;

    @ApiModelProperty(value = "license有效期,pattern="+ PatternConsts.NORM_DATE_PATTERN)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date licenseExpireDate;

}
